import React from "react"
import {RouteObject} from "react-router-dom";

export interface MetaProps {
    key?: string;
    icon?: string;
    title?: string;
    activeMenu?: string;
    isLink?: string;
    hidden?: boolean;
    isFull?: boolean;
    isAffix?: boolean;
    isKeepAlive?: boolean;
}

export type RouteObjectType = Omit<RouteObject, "children"> & {
    redirect?: string;
    meta?: MetaProps;
    children?: RouteObjectType[];
};
export type routerType = {
    path: string;
    element: React.ReactNode
    loader: () => Record<string, any>
} & RouteObjectType

export type routeMapType = {
    path: string,
    loader: () => Record<string, any>
    redirect?: string;
    meta?: MetaProps;
    element?: React.ReactNode
}
